<?php

/**
 * homepage actions.
 *
 * @package    baumarktforsibers.kg
 * @subpackage homepage
 * @author     Belitskii Ivan
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class homepageActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
    public function executeIndex(sfWebRequest $request)
    {
        //$this->forward('default', 'module');
    }
    
    /**
     * Execute 404 page layout
     * @param sfWebRequest $request
     */
    public function execute404(sfWebRequest $request) {
        
    }
    
    public function executeRestrict(sfWebRequest $request) {
        $time = date("H:i:s", time());
        $min_time = date("H:i:s", mktime(sfConfig::get('app_mintime'), "0", "0"));
        $max_time = date("H:i:s", mktime(sfConfig::get('app_maxtime'), "0", "0"));
        if (($time > $min_time && $time < $max_time) || $this->getUser()->isAuthenticated() == false) {
            $this->redirect("viewproducts");
        }
    }
}
